# -*- coding: utf-8 -*-
from model.studio import Studio


def update_studio_place():
    studio_list = Studio.find({}, [
        Studio.Field.place
    ])
    for studio in studio_list:
        Studio.collection.update({
            Studio.Field._id: studio.get(Studio.Field._id)
        }, {
            '$set': {
                Studio.Field.place + '.' + Studio.Place.province: u'广东',
                Studio.Field.place + '.' + Studio.Place.city: u'广州'
            }
        })


if __name__ == '__main__':
    update_studio_place()
